package zust.javaee.dto;

import org.hibernate.Session;
import zust.javaee.entity.Tcorporation;
import zust.javaee.entity.Tplayer;

public class SessionInfo implements java.io.Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 1L;


    private Integer playerId;

    private String playerName;

    private Short type;

    /**
     * 社团负责人的信息
     */
    private Integer corporationId;

    private String corporationName;

    public SessionInfo (Tplayer tplayer) {
        this.playerId = tplayer.getId();
        this.playerName = tplayer.getName();
        this.type = tplayer.getType();
    }

    public SessionInfo (Tplayer tplayer, Tcorporation tcorporation) {
        this.playerId = tplayer.getId();
        this.playerName = tplayer.getName();
        this.type = tplayer.getType();

        this.corporationId = tcorporation.getId();
        this.corporationName = tcorporation.getName();
    }


    public SessionInfo() {
    }

    public SessionInfo(Integer playerId, String playerName, Short type, Integer corporationId, String corporationName) {
        this.playerId = playerId;
        this.playerName = playerName;
        this.type = type;
        this.corporationId = corporationId;
        this.corporationName = corporationName;
    }

    public Integer getPlayerId() {
        return playerId;
    }

    public void setPlayerId(Integer playerId) {
        this.playerId = playerId;
    }

    public String getPlayerName() {
        return playerName;
    }

    public void setPlayerName(String playerName) {
        this.playerName = playerName;
    }

    public Short getType() {
        return type;
    }

    public void setType(Short type) {
        this.type = type;
    }

    public Integer getCorporationId() {
        return corporationId;
    }

    public void setCorporationId(Integer corporationId) {
        this.corporationId = corporationId;
    }

    public String getCorporationName() {
        return corporationName;
    }

    public void setCorporationName(String corporationName) {
        this.corporationName = corporationName;
    }
}
